package com.yanchangapp.ui.activity.purchase.contract;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.yanchangapp.R;
import com.zxl.baselib.ui.base.BaseActivity;
import com.zxl.baselib.ui.base.BasePresenter;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ContractClauseActivity extends BaseActivity {

    @BindView(R.id.ivToolbarNavigation)
    ImageView ivToolbarNavigation;
    @BindView(R.id.vToolbarDivision)
    View vToolbarDivision;
    @BindView(R.id.tvToolbarTitle)
    TextView tvToolbarTitle;
    @BindView(R.id.tvClauseContent)
    TextView tvClauseContent;
    private String clause;

    private static final String CLAUSE = "clause";

    public static void show(Activity activity, String clause) {
        Intent intent = new Intent(activity, ContractClauseActivity.class);
        intent.putExtra(CLAUSE, clause);
        activity.startActivity(intent);
    }

    @Override
    protected void init() {
        if (getIntent() != null) {
            clause = getIntent().getStringExtra(CLAUSE);
        }
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_contract_clause;
    }

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        tvToolbarTitle.setText("合同条款");
        tvClauseContent.setText(clause);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initListener() {
        ivToolbarNavigation.setOnClickListener(v -> finish());
    }
}
